﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Wicresoft.UnifyShow.Business
{
    public interface IIncident
    {
        //总事件
        List<IncidentAndChangeModel> GetIncidentList(int? site, int? bnid, DateTime? sTime, DateTime? eTime);
        //总事件
        Decimal GetCountIncident(int? site, int? bnid, DateTime? sTime, DateTime? eTime);
        //已解决事件
        Decimal GetApproveCountIncident(int? site, int? bnid, DateTime? sTime, DateTime? eTime);
        //规定时间内解决的事件数量/百分比
        Decimal GetCountIncidentByResolvedTimeOut(int? site, int? bnid, DateTime? sTime, DateTime? eTime);
        //平均解决时间
        List<IncidentAndChangeModel> GetCountIncidentAvgtmeBySite(int? site, int? bnid, DateTime? sTime, DateTime? eTime);
        //一线解决率（服务台+现场工程师
        List<IncidentAndChangeModel> GetCountIncidentByResolvedGroup1(int? site, int? bnid, DateTime? sTime, DateTime? eTime);
        //二线解决率
        List<IncidentAndChangeModel> GetCountIncidentByResolvedGroup2(int? site, int? bnid, DateTime? sTime, DateTime? eTime);
        //重大事件数量
        List<IncidentAndChangeModel> GetSeriousCountIncidentByImpact(int? site, int? bnid, DateTime? sTime, DateTime? eTime);
        //一般事件数量
        List<IncidentAndChangeModel> GetGeneralCountIncidentByImpact(int? site, int? bnid, DateTime? sTime, DateTime? eTime);
        //事件升级率
        Decimal GetIncidentEscalationBySite(int? site, int? bnid, DateTime? sTime, DateTime? eTime);
        //按照事件结束代码分类
        List<IncidentAndChangeModel> GetIncidentCloseCodeBysite(int? site, int? bnid, DateTime? sTime, DateTime? eTime);

        //服务统计 已解决事件， 所有事件
        List<SiteBranchAndWorkListModel> GetIncidentInfoList(int? site, int? bnid, DateTime? sTime, DateTime? eTime);

        List<IncidentModel> GetPageAndSortIncidentBySiteIDAndBSID(int siteID, int bsID, out Decimal totalRecords, int pageSize = -1, int pageIndex = -1,
            string sortName = "TicketCreateTime", string sortDirection = "Descending"/*Ascending,Descending*/);

        List<IncidentModel> GetPageAndSortIncidentBySiteID(int siteID, out Decimal totalRecords, int pageSize = -1, int pageIndex = -1,
            string sortName = "TicketCreateTime", string sortDirection = "Descending"/*Ascending,Descending*/);

        List<IncidentModel> GetPageAndSortIncidentBySiteIDBSIDAndDeviceID(int siteID, int bsID, int deviceID, out Decimal totalRecords, int pageSize = -1, int pageIndex = -1,
            string sortName = "TicketCreateTime", string sortDirection = "Descending"/*Ascending,Descending*/);

        List<IncidentModel> GetUnResolvedIncidentList(int? site, DateTime? sTime, DateTime? eTime, int? ps, int? pi);

        List<SiteBranchAndWorkListModel> GetIncidentInfoListBySystemName(int? site, string systemname, DateTime? sTime, DateTime? eTime);

    }
}
